package com.snow.rbac.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * All rights Reserved, Designed By www.cusc.com
 *
 * @author yanke
 * @Title: UserController
 * @Package com.snow.dayou.controller
 * @Description:类描述
 * @Email yanke@cu-sc.com
 * @version: v1.0.0
 * @date: 2021/3/31/0031 16:39
 * @Copyright: 2021  www.faw.com.cn Inc. All rights reserved. <br/>
 * Modification History:<br/>
 * Date         Author          Version            Description<br/>
 * *---------------------------------------------------------*<br/>
 * 2021/3/31/0031     Administrator           v1.0.0               修改原因<br/>
 * @since JDK 1.8
 */
@Slf4j
@RestController
@RequestMapping("/rbac")
public class RbacController {

    //    @Autowired
//    private MinioUtils minioUtils;
//    @Autowired
//    private MallfeignService mallfeignService;
//    @Autowired
//    private RedisTemplate redisTemplate;
//    @Autowired
//    private IUserInfoService userInfoService;

    @GetMapping("/{id}")
    public String login(@PathVariable Long id) {
        log.info("用户登录:{}", id);
        return String.valueOf(id);
    }

//    @GetMapping("/getUserInfo/{id}")
//    public UserInfo getUserInfo(@PathVariable(value = "id") Long id) {
//        UserInfo userInfo = userInfoService.getById(id);
//        return userInfo;
//    }

//    @GetMapping("/minio")
//    public String minio() {
//        String endpoint = minioUtils.getMinioConfig().getEndpoint();
//        minioUtils.uploadFile();
//        return endpoint;
//    }

//    @GetMapping("/presignedGetObject")
//    public String presignedGetObject(@RequestParam("object") String object, @RequestParam(value = "expire", required = false) Integer expire) {
//        if (Objects.nonNull(expire)) {
//            return minioUtils.presignedGetObject(object, expire);
//        } else {
//            return minioUtils.presignedGetObject(object);
//        }
//    }
}
